<?php 
header('Content-type:text/html;charset=utf-8');
class IndexController{
	public function __call($func,$param){
	    header('Location:4index.php');
	}
	public function index(){
	    echo '留言首页';
	}
	public function add(){
	    echo '添加留言';
	}
	public function del(){
	    echo '删除留言';
	}
	public function red(){
		echo '修改留言';
	}
}
$o = new IndexController;
$action = isset($_GET['a']) ? $_GET['a'] : 'index';
$o ->$action();


 ?>
 <html>
 	<head>
 		<title></title>
 	</head>
 	<body>
 		<ul>
 			<li><a href="?a=index">首页</a></li>
 			<li><a href="?a=add">添加</a></li>
 			<li><a href="?a=del">删除</a></li>
 			<li><a href="?a=red">编辑</a></li>
 		</ul>
 	</body>
 </html>